package com.goudan.ojcloudjudgeservice.codesandbox.impl;
import com.goudan.ojcloudjudgeservice.codesandbox.CodeSandBox;
import com.goudan.ojmodel.codesandbox.ExecuteCodeRequest;
import com.goudan.ojmodel.codesandbox.ExecuteCodeResponse;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * 代码沙箱静态代理
 */
@Slf4j
@AllArgsConstructor
public class CodeSandBoxProxy implements CodeSandBox {
    private CodeSandBox codeSandBox;
    @Override
    public ExecuteCodeResponse executeCode(ExecuteCodeRequest executeCodeRequest) {
        log.info("执行代码");
        ExecuteCodeResponse executeCodeResponse = codeSandBox.executeCode(executeCodeRequest);
        log.info("执行代码结束{}",executeCodeResponse);
        return executeCodeResponse;
    }
}
